/*
* 根据移动端设备分辨率来设置字体 方便使用rem
*/
function appendEmByWidth() {
  var navigatorUserAgent = navigator.userAgent;
  var iPhone = navigatorUserAgent.indexOf("iPhone");
  var one_dpr
  if (iPhone > -1) {
  var dpr = Number(window.devicePixelRatio),
  one_dpr = 1 / dpr;
  } else {
  var dpr = 1,
  one_dpr = 1;
  }
  var html = document.getElementsByTagName("html");
  let screenW = document.body.clientWidth,
  style = document.createElement('style'),
  size = (screenW / 750) * 20,
  styles = 'html{font-size:' + size + 'px !important;}';
  (document.getElementsByTagName("head")[0] || document.body).appendChild(style);
  html[0].setAttribute("data-dpr", dpr);
  if (style.styleSheet) {
  style.styleSheet.cssText = styles;
  } else {
  style.appendChild(document.createTextNode(styles));
  }
  }